RNA-Seq Data Analysis    ◾    197

my.contrasts

<- makeContrasts(conditiontumo-conditionnorm,levels=design)

fitg<- glmFit(yNorm, design)

qlfg<- glmLRT(fitg,contrast=my.contrasts)

topTags(qlfg, n=10, adjust.method=”BH”, sort.by=”PValue”,

p.value=0.05)

Notice that we used contrast to conduct differential analysis to study the effect of tumor

on the gene expression. However, the design may be more complex and EdgeR provides

several ways to construct contrast based on the study design. For instance, you can add

the intercept to the design matrix so the first column on the design will be the reference.

We can also use “coef=” with “glmQLFTest” or “glmLRT” functions to indicate that the

specified coefficients are zero. In more complex design like factorial design, an ANOVA-

like analysis can be conducted. Refer to Edger users’ manual for more information about

the designs.

EdgeR also provides “glmTreat” function to conduct gene-wise statistical tests for a

given coefficient or a contrast relative to a specified fold-change threshold. For instance,

assume that we need to test the hypothesis that the gene expression in normal cells and

tumor cells is equal at a threshold of 2 log-fold change (lfc=2), assuming that a gene with a

log-fold change less than 2 is equally expressed in both normal and tumor cells.

my.contrasts

<- makeContrasts(conditiontumo-conditionnorm,levels=design)

fitq <- glmQLFit(yNorm, design)

qlfq<- glmTreat(fitq, contrast=my.contrasts, lfc=2)

topTags(qlfq, n=10, adjust.method=”BH”, sort.by=”PValue”,

p.value=0.05)

Figure 5.23 shows the top ten significantly expressed genes using a log-fold change thresh-

old (lfc=2).

Since the FDR (the rate of incorrectly rejecting null hypothesis) may be inflated in

the case of multiple testing, it can be corrected using Benjamini–Hochberg method [36],

which orders hypotheses and then rejects or accepts a hypothesis based on the Benjamini–

Hochberg critical value.

The “decideTestsDGE” function can be used to display the total number of differentially

expressed genes identified at an FDR of 5% (upregulated, downregulated, and no-signifi-

cant regulation).

my.contrasts

<- makeContrasts(conditiontumo-conditionnorm,levels=design)

fitq<-glmQLFit(yNorm, design)

qlfq<-glmQLFTest(fitq, contrast=my.contrasts)

DEGenes<-decideTestsDGE(qlfq,

adjust.method=”BH”, p.value=0.05, lfc=2)

summary(DEGenes)